import java.util.*;

class Add{
	public String name;
	public byte age;
	public char sex;
	private Scanner sc = new Scanner(System.in);
	private int count = 0, number;
	public static LinkedList<Student> info = new LinkedList<Student>();

	Add(){
		System.out.printf("How many student you will set? ");
		number = sc.nextInt();
		addInfo();
	}

	public void addInfo(){
		while (count < number){
			System.out.printf("Setting the %dth student...\n",count+1);
			System.out.printf("Please set a name: ");
			name = sc.next();
			System.out.printf("Please set age: ");
			age = sc.nextByte();
			System.out.printf("Plese set sex: ");
			String str = sc.next();
			sex = str.charAt(0);
			Student student = new Student(name, age, sex);
			info.add(student);
			count++;
		}
		System.out.printf("Setting finished!\n\n");

	}
}
